package com.deli;

import org.junit.Test;

public class DemoInteger {

    @Test
    public void excute() {
        Thread1 thread1 = new Thread1();
        Thread1 thread2 = new Thread1();
        Thread thread3 = new Thread(thread1, "1");

        Thread thread4 = new Thread(thread2, "2");
        thread3.start();
        try {
            thread3.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        thread4.start();

    }


}

class Thread1 implements Runnable {
    @Override
    public void run() {
        for (int i = 0; i < 10000; i++) {
            System.out.println(i);
        }
    }
}
